/**
 * 
 */
package com.eis.sf.in.connector;

import java.util.ArrayList;
import java.util.List;

import com.eis.sf.in.connector.conf.SFConnParameter;
import com.eis.sf.in.connector.conf.SFConnectorConfig;
import com.eis.sf.in.connector.datatype.SFDataTypeList;
import com.eis.sf.in.connector.parameter.SFParameterDefine;
import com.eis.thirdsys.connector.ConnectorStatics;
import com.eis.thirdsys.connector.ThirdSysConnector;
import com.eis.thirdsys.connector.conf.ConnectorConfig;
import com.eis.thirdsys.connector.conf.bean.ConfParameterName;
import com.eis.thirdsys.connector.datatype.DataTypeList;
import com.eis.thirdsys.connector.parameter.ParameterDefine;

/**
 * @author panwei
 *
 */
public class SFConnectorStatics implements ConnectorStatics {
	private static List<ConfParameterName> CONF_PARAMETER_NAME_LIST = new ArrayList<ConfParameterName>();
	private static final ParameterDefine PARAMETER_DEFINE = new ParameterDefine();
	static {
		for (SFConnParameter para : SFConnParameter.values()) {
			ConfParameterName confParameter = new ConfParameterName(
					para.name(), para.getDisplayName(), para.getExample());
			
			CONF_PARAMETER_NAME_LIST.add(confParameter);
		}
		
		for (SFParameterDefine define : SFParameterDefine.values()) {
			PARAMETER_DEFINE.addElement(define.getElement());
		}
	}

	/* (non-Javadoc)
	 * @see com.eis.thirdsys.connector.ConnectorStatics#getConnectorClass()
	 */
	public Class<? extends ThirdSysConnector> getConnectorClass() {
		return SFConnector.class;
	}

	/* (non-Javadoc)
	 * @see com.eis.thirdsys.connector.ConnectorStatics#getConfigClass()
	 */
	public Class<? extends ConnectorConfig> getConfigClass() {
		return SFConnectorConfig.class;
	}

	/* (non-Javadoc)
	 * @see com.eis.thirdsys.connector.ConnectorStatics#getDataTypeListClass()
	 */
	public Class<? extends DataTypeList> getDataTypeListClass() {
		return SFDataTypeList.class;
	}

	/* (non-Javadoc)
	 * @see com.eis.thirdsys.connector.ConnectorStatics#getConfParameterNames()
	 */
	public List<ConfParameterName> getConfParameterNames() {
		return CONF_PARAMETER_NAME_LIST;
	}

	public ParameterDefine getParameterDefine() {
		return PARAMETER_DEFINE;
	}
}
